#include <stdio.h>
#include <ctype.h>

int main(){
    char c;
    printf("Enter a character: ");
    scanf("%c",&c);
    int n=(int)c;
    if(isprint(n)){
        printf("printable\n");
        if(isgraph(n)){
            if(isalnum(n)){
                if(isalpha(n)){
                    if(islower(n)){
                        printf("lowercase\n");
                    }
                    if(isupper(n)){
                        printf("capital\n");
                    }
                }
                if(isxdigit(n)){
                    printf("hexadecimal\n");
                    if(isdigit(n)){
                        printf("decimal\n");
                    }
                }
            }
            if(ispunct(n)){
                printf("punctutation\n");
            }
        }
        if(isspace(n)){
            printf("space\n");
        }
    }else{
        printf("unprintable\n");
        if(iscntrl(n)){
            printf("control\n");
        }
    }
}
